{% extends "base_tmp.html" %}

{% block content %}

<!--内容-->
<div class="container" style="margin-top:76px">
    <div class="row">
        {# 主页部分#}
        <div class="col-md-8">
        {% for order in orders %}

            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-list-alt"></span>{{user.username}}的订单</h3>
                </div>
                <div class="panel-body">

                        <div>
                            <h3>当前订单号:{{ order.order_id }}</h3>
                            <table class="table" style="border: 1px;">
                            <thead>
                            <tr>
                                <th class="yellow header">详情</th>
                                <th class="header">数量</th>
                                <th class="blue header">单价</th>
                                <th class="green header">小计</th>
                            </tr>
                            </thead>
                            {% for item in order.items %}
                            <tbody>
                            <tr>
                                <td>
                                    <div>
                                        <img src="/static/imgs/full/{{item.art.a_img_url_figer}}.jpg" style="height: 50px" class="pull-left">
                                        <div class="pull-left text-justify" style="margin-left: 10px">{{ item.art.a_title }}</div>
                                    </div>
                                </td>
                                 <td>{{item.quantity}}</td>
                                <td>{{item.art.a_price}}</td>
                                <td>{{item.price}}</td>
                            </tr>
                            {% endfor %}

                            <tr style="color: green">
                                <th></th>
                                <td></td>
                                <th>总计：</th>
                                <th>{{order.price}}</th>
                            </tr>
                            </tbody>

                        </table>
                        </div>

                        <div class="pull-right">
                            <a class="btn  btn-info" type="button" href="#">已完成订单</a>
                            <a class="btn  btn-danger" type="button" href="{% url 'order:hide_order' %}?oid={{ order.id }}">隐藏此订单</a>
                        </div>
                </div>
            </div>

        {% endfor %}

        </div>

        {# 推荐部分#}
        <div class="col-md-4">
             <div class="recommend "></div>
        </div>
    </div>
</div>

{% endblock %}

{% block js %}
<script language="JavaScript">
    $(document).ready(function () {
    });


</script>
{% endblock %}